import 'dart:io';

import 'package:flutter_image_compress/flutter_image_compress.dart';

  class CompressImage{

  ///压缩
    static Future<File> testCompressAndGetFile(File file, String targetPath) async {
    var result = await FlutterImageCompress.compressAndGetFile(
      file.absolute.path, targetPath,
      quality: 50,
      rotate: 0,
    );
    print("压缩");
    print(file.lengthSync());
    print(result.lengthSync());

    return result;
  }

}